package com.springcloud.hystrixdemo.service

import com.springcloud.hystrixdemo.config.FeignConfig
import com.springcloud.hystrixdemo.service.impl.FeignServiceFallback
import org.springframework.cloud.openfeign.FeignClient
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestParam

    //在feign.hystrix开启的情况下,使用fallback指定回退类
@FeignClient(name = 'p1',fallback = FeignServiceFallback,configuration = FeignConfig)
interface FeignService {

    @GetMapping('msg')
    String msg(@RequestParam('wd') String wd)
}